lst = [232,"456","abcba","dfgdgfd",89798,243986,"ersjf"]

a=filter(lambda  x:str(x)==str(x)[::-1],lst)
print(tuple(a))


b=filter(lambda x:len(str(x)) >=5,lst)
print(list(b))

def filterNum(x):
    if type(x) == str:
        if len(x) >=5:
            return True
    else:
        return False
c=filter(filterNum,lst)
print(list(c))



names =["lily","lucy11","jack1","anby","tom"]
newnames=sorted(names,reverse=True)
newnames1=sorted(names)
print(newnames)
print(newnames1)
newnames2=sorted(names,key=lambda x:len(x))
print(newnames2)



